fix(gbrain-sources): bump sources list --json timeout 10s → 30s#1507
Closed
thehashrocket wants to merge 1 commit into
Closed
fix(gbrain-sources): bump sources list --json timeout 10s → 30s#1507thehashrocket wants to merge 1 commit into
thehashrocket wants to merge 1 commit into
Conversation
Supabase free-tier cold-starts can push `gbrain sources list --json` past 10s (observed 14.5s in the wild), causing probeSource() to throw ETIMEDOUT during /sync-gbrain code stage even though the underlying CLI was healthy. Matches the 30s ceiling already used by `sources add` / `sources remove` in the same file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 tasks
Owner
|
Thank you @thehashrocket. Cherry-picked into v1.40.0.0 with attribution preserved (Author: Jason Shultz). See commit 62ff90c. Consolidated v1.40.0.0 fix wave lands as PR #1547. Closing this one as superseded — your contribution is recognized in CHANGELOG.md and the commit metadata. |
anbangr
added a commit
to anbangr/gstack
that referenced
this pull request
May 18, 2026
….1.0 Resolved version-slot collision: upstream's v1.40.0.0 was renumbered to v1.40.0.5 in the CHANGELOG so it slots cleanly between fork's v1.40.0.0 (supervised-restart sweep fix) and v1.40.1.0 (test-framework detection). All upstream code, tests, and migrations land verbatim — only the version header on the changelog entry changed. Conflict resolutions: - VERSION: kept fork 1.40.1.0 - package.json: kept fork 1.40.1.0 - CHANGELOG.md: kept fork entries (1.40.1.0, 1.40.0.0 supervised-restart) + added upstream's gbrain-sync entry renumbered to 1.40.0.5 with a note explaining the renumber - bin/gstack-artifacts-init: took upstream's additive patterns (projects/*/*-design-*.md, *-test-plan-*.md, *-eng-review-test-plan-*.md) Upstream PRs landed in this merge (credits in 1.40.0.5 CHANGELOG entry): - 0xDevNinja (hostname fold garrytan#1468) - drummerms (hyphen-boundary cut garrytan#1481) - Jayesh Betala (probe CLI garrytan#1485) - Jason Shultz (DATABASE_URL seeding garrytan#1508 + timeout garrytan#1507) - genisis0x (consumer gitignore garrytan#1521, allowlist eng-review garrytan#1465, Windows postinstall garrytan#1487)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gbrain sources list --jsontimeout from 10s to 30s in bothprobeSource()andsourcePageCount()(lib/gbrain-sources.ts).sources add/sources removein the same file.Why
On Supabase free-tier engines,
gbrain sources list --jsoncan take noticeably longer than 10s after a cold start. Observed today on a fresh/sync-gbraininvocation:That blew past
probeSource()'s 10s timeout and surfaced as:The CLI itself was healthy —
gbrain sources add(30s timeout) succeeded on the same machine when invoked manually, and a/sync-gbrain --code-onlyretry after that completed cleanly (98 pages, 310 chunks). The probe just needs more rope when the underlying engine is cold.Test plan
bun test lib/gbrain-sources.test.ts(if covered) still passes/sync-gbrainon a Supabase-backed install after >7d inactivity (cold-start) succeeds on the first invocation instead of needing a--code-onlyretry🤖 Generated with Claude Code